package modelImp;

import java.awt.Image;
import java.util.Vector;

import model.ModelPawn;
import model.ModelPlayer;

public class Player extends ModelPlayer {
	private Image pawnColor; 
	private Tile currentTile;
	
	
	
	public Player(String name, Image m) {
		this.name = name;
		this.pawns = new Vector<ModelPawn>();
		this.pawnColor = m;
		
	}
	
		
	public void setCurrentTile(Tile currentTile) {
		this.currentTile = currentTile;
	}

	public Tile getCurrentTile() {
		return currentTile;
	}
	
	public boolean addPawn(ModelPawn p){
		if(p!=null && !this.pawns.contains(p))
		{
			this.pawns.add(p);
			return true;
		}
		return false;
	}
	
	public ModelPawn removePawn(int i){
		return this.pawns.remove(i);
	}
	
	public ModelPawn getPawn(int i){
		return this.pawns.get(i);
	}
	
	public int getPawnSize(){
		return this.pawns.size();
	}



	public void addPoint(int point){
		this.setScore(this.getScore()+point);
	}


	public void setImage(Image pawnColor) {
		this.pawnColor = pawnColor;
	}


	public Image getImage() {
		return pawnColor;
	}



}
